﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Logistics_Management_System.Booking
{
    public class Order_Repository : ServiceBase
    {
        public LG_Order GetOrderById(int order_id)
        { return (from ord in this.DB.LG_Orders where ord.Id == order_id select ord).FirstOrDefault<LG_Order>(); }

        public List<LG_Order> GetOrdersByCustomerId(int cust_id)
        { return (from ords in this.DB.LG_Orders where ords.Customer_Id == cust_id select ords).ToList<LG_Order>(); }

    }
}